package com.loong.uiframetest;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.loong.uiframetest.QMUI.QmuidialogTest;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    //初始化
    private void init() {
        //SwitchButton按钮
        findViewById(R.id.to_switch_button).setOnClickListener(this);
        //swipeLayout按钮
        findViewById(R.id.to_swipe_layout).setOnClickListener(this);
        //QMUIDialog按钮
        findViewById(R.id.to_qmui).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent;
        switch (v.getId()) {
            case R.id.to_switch_button:
                intent = new Intent(this, SwitchButtonTest.class);
                startActivity(intent);
                break;
            case R.id.to_swipe_layout:
                intent = new Intent(this, AndroidSwipeLayoutTest.class);
                startActivity(intent);
                break;
            case R.id.to_qmui:
                intent = new Intent(this, QmuidialogTest.class);
                startActivity(intent);
                break;
            default:
                break;
        }
    }
}
